package chapter01;

public class F {

    public static void main(String[] args) {
        int f = f(50);
        System.out.println(f);
    }


    public static int f(int x) {
        if (x == 0) {
            return 0;
        }else {
            return 2 * f(x - 1) + x * x;
        }
    }
}


